<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;
$this->title = '我的课程';
?>
<?php echo $this->render('_centerHeader') ?>
<!--主体开始-->
<div class="main-area" style=" background: #f5f5f5;">
    <div class="container">
        <div class="column-layout">
            <!-- main-area-left start  -->
<div class="column-col column-full main-area-left">
<div dy-v="00-00-11-00" class="main-area-leftin tab-box learn-box">
<div class="ibox">
<div class="ibox-in">
<div class="ibox-head">
	<ul class="tab-list" role="tablist">
	<?php if($status == 'course'){?>
		<li role="presentation" class="active">
			<a href="<?= Url::to(['center/course'])?>?status=course">学习中课程</a>
		</li>
	<?php }else{?>
		<li role="presentation">
			<a href="<?= Url::to(['center/course'])?>?status=course">学习中课程</a>
		</li>
	<?php }?>
	<?php if($status == 'courseend'){?>
		<li role="presentation" class='active'>
			<a href="<?= Url::to(['center/courseend'])?>?status=courseend">已完成课程</a>
		</li>
	<?php }else{?>
		<li role="presentation">
			<a href="<?= Url::to(['center/courseend'])?>?status=courseend">已完成课程</a>
		</li>
	<?php }?>
	<?php if($status == 'coursecollect'){?>
		<li role="presentation" class='active'>
			<a href="<?= Url::to(['center/coursecollect'])?>?status=coursecollect">已收藏课程</a>
		</li>
	<?php }else{?>
		<li role="presentation">
			<a href="<?= Url::to(['center/coursecollect'])?>?status=coursecollect">已收藏课程</a>
		</li>
	<?php }?>
	</ul>
</div>
<div class="ibox-body tab-pane-list">
	<!-- 正在学课程  -->
	<div role="tabpanel" class="tab-pane active" id="KC_ING">
	
		<div class="row learn-lesson-list">
			
			<!-- item  -->
			<!-- <div class="col-xs-4 item">
				<div class="col-in">
					<a href="http://www.bwphp.com/course/php/491-6400/" target="_blank">
						<span class="learn-lesson-pic"><img src="/static/images/4.jpg" alt=""></span>
						<span class="learn-lesson-name" title="Laravel：地球上最好用的PHP框架 - 入门篇">
						Laravel：地球上最好用的PHP...</span>
						<span class="learn-lesson-relative" title="Laravel：地球上最好用的PHP框架 - 入门篇">Laravel：地球上最好用的P...</span>
					</a>
				</div>
			</div> -->
			<?php if($course !=''){?>
			<?php foreach($course as $k=>$v){?>
			<div class="col-xs-4 item">
				<div class="col-in">
					<a href="<?= Url::to(['course/course-detail'])?>?course_id=<?php echo $v['course_id']?>" target="_blank">
						<span class="learn-lesson-pic"><img src="<?php echo 'http://files.bwphp.com/file/image/show/250/160?path='.$v['course_thumb']?>" alt=""></span>
						<span class="learn-lesson-name" title="<?php echo $v['course_name']?>">
						<?php echo $v['course_name']?></span>
						<span class="learn-lesson-relative" title="<?php echo $v['course_name']?>"><?php echo $v['describe']?></span>
						<span class="learn-lesson-pic"><?php echo $v['apply_num']?>人在学习</span>
						<?php if($v['is_serialize']==0){
								$v['is_serialize'] = '非连载';
							}else if($v['is_serialize']==1){
								$v['is_serialize'] = '连载中';
							}else if($v['is_serialize'] == 2){
								$v['is_serialize'] = '已完结';
							}
						?>
						<span class="learn-lesson-pic"><?php echo $v['is_serialize']?></span>
						<span class="learn-lesson-pic"><?php echo date('Y-m-d H:i:s',$v['upd_time'])?></span>
					</a>
				</div>
			</div>
			<?php }?>
			<?php }else{ echo "<h1><center>没有相关课程</center></h1>";}?>
		</div>
			   <?php echo LinkPager::widget([
				'pagination' => $pagination,
				'prevPageLabel'=>'上一页',
				'nextPageLabel'=>'下一页',
			]);?>
	</div>
</div>
</div>
</div>
</div>
</div>

            <!-- main-area-left end  -->
            <!-- main-area-right start  -->
            <div dy-v="00-00-11-11" class="column-col main-area-right">
                
                <!-- 课程推荐 -->
                <?php echo $this->render('../common/_courseRecommend') ?>
 
                <!-- 名师推荐 -->
                <?php echo $this->render('../common/_teacherRecommend') ?>

                <!-- 图片广告 -->
                <?php echo  $this->render('../common/_adRecommend') ?>
            </div>
            <!-- main-area-right end  -->
        </div>
    </div>
</div>
